From: Soren Brinkmann Date: Thu, 9 Jun 2016 20:36:27 +0000 (-0700) Subject: build_macros: Add 'add_define_val' macro X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22http:/www.crowdsec.net/%22/%22https:/collectd.org/%22http:/www.crowdsec.net/%22?a=commitdiff_plain;h=8eadeb4adeabffe25df5cbfaaa69f7f9b1f362ae;p=project%2Fbcm63xx%2Fatf.git build_macros: Add 'add_define_val' macro Add a convenience macro to add a build definition with a value. Signed-off-by: Soren Brinkmann --- diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk index 5171ff00..19b88ad5 100644 --- a/make_helpers/build_macros.mk +++ b/make_helpers/build_macros.mk @@ -68,6 +68,13 @@ define add_define DEFINES += -D$(1)$(if $(value $(1)),=$(value $(1)),) endef +# Convenience function for adding build definitions +# $(eval $(call add_define_val,FOO,BAR)) will have: +# -DFOO=BAR +define add_define_val + DEFINES += -D$(1)=$(2) +endef + # Convenience function for verifying option has a boolean value # $(eval $(call assert_boolean,FOO)) will assert FOO is 0 or 1 define assert_boolean